<script type="text/javascript">
$(document).ready(function(){
    $('#searchresult .paginationControl a').click(function(event) {
    	$('#searchresult').html('<img alt="<?=$this->translate('loadMsg') ?>" src="/img/ajax-loader.gif"/><?=$this->translate('loadMsg') ?>');
        event.preventDefault();
        var link = $(this).attr('href');
        $(this).attr('href', '#');

        loadView(link, $('#searchresult'), null);
    });
});
</script>

<?php if ($this->pageCount): ?>
<div class="paginationControl">
	<?= $this->firstItemNumber; ?> - <?= $this->lastItemNumber; ?>
	<?= $this->translate('of')?> <?= $this->totalItemCount; ?>
	
	<!-- First page link -->
	<?php if (isset($this->previous)): ?>
	  <a href="<?= $this->url(array('page' => $this->first)); ?>">
	    <?= $this->translate('first')?>
	  </a> |
	<?php else: ?>
	  <span class="disabled"><?= $this->translate('first')?></span> |
	<?php endif; ?>

	<!-- Previous page link -->
	<?php if (isset($this->previous)): ?>
	  <a href="<?= $this->url(array('page' => $this->previous)); ?>">
	    &lt; <?= $this->translate('previous')?>
	  </a> |
	<?php else: ?>
	  <span class="disabled">&lt; <?= $this->translate('previous')?></span> |
	<?php endif; ?>

	<!-- Next page link -->
	<?php if (isset($this->next)): ?>
	  <a href="<?= $this->url(array('page' => $this->next)); ?>">
	    <?= $this->translate('next')?> &gt;
	  </a> |
	<?php else: ?>
	  <span class="disabled"><?= $this->translate('next')?> &gt;</span> |
	<?php endif; ?>

	<!-- Last page link -->
	<?php if (isset($this->next)): ?>
	  <a href="<?= $this->url(array('page' => $this->last)); ?>">
	    <?= $this->translate('last')?>
	  </a>
	<?php else: ?>
	  <span class="disabled"><?= $this->translate('last')?></span>
	<?php endif; ?>
</div>
<?php endif; ?>
